import { BasicFetchResult, SaaSPageParams } from '/@/api/model/baseModel';

export type OrderParams = {
  orderId?: string;
  commodityName?: string;
  customer?: string;
  startCreatedTime?: string;
  endCreatedTime?: string;
};

export type OrderPageParams = { model: OrderParams } & SaaSPageParams;

export interface SaaSOrderListItem {
  id: string;
  commodityId: string;
  amount: string;
  customer: string;
  money: number;
  regionId: string;
  address: string;
  status: number;
  region: string;
}

export type SaaSOrderPostForm = {
  id?: string;
  commodityId: string;
  amount: number;
  customer: string;
  regionId: string;
  address: string;
  status?: number;
};

export interface SaaSRegionTreeItem {
  regionId: string;
  regionName: string;
  parentRegionId: string;
  children: SaaSRegionTreeItem[];
}

// 根据商品ID查询商品单价
export type PriceParams = {
  commodityId?: string;
};

export interface OrderListItem {
  orderId: number; //订单编号
  commodityName: string; //商品名称
  commodityNum: number; //商品数量
  customerName: string; //客户名称
  orderAmount: number; //订单金额
  createTime: string; //创建时间
  orderStatus: string; //订单状态
}

export type OrderListGetResultModel = BasicFetchResult<OrderListItem>;
